//
//  TKIMSearchView.h
//  TKIM
//
//  Created by liupm on 15/10/31.
//  Copyright © 2015年 liupm. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface TKIMSearchView : UIView<UISearchBarDelegate,UITableViewDataSource,UITableViewDelegate, UIScrollViewDelegate>
//列表
@property(nonatomic,strong) UITableView *tableView;
//数据源
@property(nonatomic,strong) NSMutableArray *resultSource;
//搜索框
@property(nonatomic,strong) UISearchBar *searchBar;
//提示层
@property(nonatomic,strong) UILabel *tipLabel;
@property(nonatomic,strong) UIImageView * imageView;
//是否实时搜索
@property(nonatomic,assign) BOOL realTimeSearch;

//是否异步搜索
@property(nonatomic,assign) BOOL isAsynSearch;//是方法实现不相同

//是否显示底部的线条
@property(nonatomic,assign) BOOL isShowBottomBorder;
@property(nonatomic,weak) UIViewController *containCtrl;


/**
 *  @Author lpm, 15-12-07 17:12:49
 *
 *  @brief  初始化
 *
 *  @param frame
 *  @param searchBar
 *
 *  @return
 */
-(instancetype)initWithFrame:(CGRect)frame searchBar:(UISearchBar *)searchBar;


/**
 *  @Author lpm, 16-04-19 14:04:25
 *
 *  @brief
 *
 *  @param frame
 *  @param searchBar
 *  @param ctrl
 *
 *  @return
 */
-(instancetype)initWithFrame:(CGRect)frame searchBar:(UISearchBar *)searchBar containCtrl:(UIViewController *)ctrl;


/**
 *  @Author lpm, 15-12-07 17:12:17
 *
 *  @brief  搜索结果
 *
 *  @param text 搜索关键字
 */
-(void)searchResult:(NSString *)text;


/**
 *  @Author lpm, 15-12-07 17:12:40
 *
 *  @brief  文字改变
 *
 *  @param text
 *
 *  @return
 */
-(NSMutableArray *)textDidChange:(NSString *)text;


/**
 *  @Author lpm, 15-12-07 17:12:32
 *
 *  @brief  还原
 */
-(void)resignFirstResponder;

@end


